package com.blog.dao;

import com.blog.pojo.Message;

import java.util.List;

public interface MessageDao {
    // 添加私信（发送）
    public int addMessage(Message message);
    //删除私信
    public int deleteMessage(int id);
    //查看已发私信--用户id（权限）
    public List<Message> findMessageBySenderId(int senderId);
    //查看已收私信--用户id（权限）
    public List<Message> findMessageByReceiveId(int receiveId);
    //判断是否已单向发过一条私信
    public boolean countSenderRecevier(int senderId,int receiveId);
    //查询A和B的全部私信
    public List<Message> findMessageBySenderAndReceiver(int senderId,int receiveId);
    //判断是否互相关注
    public long followeeSenderReceiver(int senderId,int receiveId);
    //标注已读
    public int updateMessage(int id,byte isRead);

    //根据id查询一条信息
    public Message findById(int id);
}
